UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '44Av2sskASbPOBR6nZanq8ibQA+kdr4/DNTqE9Qf4kQ='
WHERE
key_id = '3b6c37e7f0bb17b5e30068c22d08f9abfe557b0c9c24b3677bd38a2a9f7eb114'
AND (
token = '44Av2sskASbPOBR6nZanq8ibQA+kdr4/DNTqE9Qf4kQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)