UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JXhCGklAJXjqtxrlZDX7JERweDl9VzMv23PYldnFU6A='
WHERE
key_id = '744988ecc3f2a3a72aeacc8860baf69c74044d2b54677eeb44fab0d86d4d0447'
AND (
token = 'JXhCGklAJXjqtxrlZDX7JERweDl9VzMv23PYldnFU6A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)