UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3vZAGiEo26KiCWVihp9+mAOBhbG8XgiHAQZn7Xei75M='
WHERE
key_id = '7cfcab73f0891c0dff5d9dfe7eae7ed609729b05d943074d8bf601494d35366f'
AND (
token = '3vZAGiEo26KiCWVihp9+mAOBhbG8XgiHAQZn7Xei75M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)