UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w46H5UlQYpstu8nSTeGed0mN6NKu/M7b9w18u8yzFJQ='
WHERE
key_id = 'ce5d6865ba0f685e23878294cf7fe863484b4b6dc96b4e8fd3004bf98845b57e'
AND (
token = 'w46H5UlQYpstu8nSTeGed0mN6NKu/M7b9w18u8yzFJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)