UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eT3cGk5DD+QXmUXR6/1kwmjCjlUj/AiroW5VYB32dq8='
WHERE
key_id = 'da90fd025fdf4b4201b2a9c5a3d3815524575f3dbe26b8f848b6a8ceaf47b697'
AND (
token = 'eT3cGk5DD+QXmUXR6/1kwmjCjlUj/AiroW5VYB32dq8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)