UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GVa0vm8i1BHB0hVFadHqDSG7CmrI9F01NFqfJsaYBHE='
WHERE
key_id = '55fd268fe296e4df09626442fe528fd8cdfb07bc1563cfd4f76bea33fcdf1a32'
AND (
token = 'GVa0vm8i1BHB0hVFadHqDSG7CmrI9F01NFqfJsaYBHE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)