UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZLgVa055M9+cNbUT/ydGVcf+cwXOPPlEZOL0xPi35tQ='
WHERE
key_id = '3e4717f37451ca1d2407411e0763524feecea885b5bac0e357b4c070ddca71a2'
AND (
token = 'ZLgVa055M9+cNbUT/ydGVcf+cwXOPPlEZOL0xPi35tQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)