UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jKxTJen5cBDMoGQcZqdh7H23xhUz0WT8NLxtDdf/E3Q='
WHERE
key_id = '142292e8ec64babec3b0e14b9773021ef83369e0c12d090aafc23915112ef5a7'
AND (
token = 'jKxTJen5cBDMoGQcZqdh7H23xhUz0WT8NLxtDdf/E3Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)