UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/CX0ru2q6XHQGgUT2HWedsCX483z1cyhpviO/LctNnQ='
WHERE
key_id = 'c5c72209b9538683aa67ffb4a3a7fde7d095b0f2de84ca2a46317a7c80556c91'
AND (
token = '/CX0ru2q6XHQGgUT2HWedsCX483z1cyhpviO/LctNnQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)