UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3WJ1l6biAd2j3MBVVzXXCkAo1bqNQXywKOy+FnlALjY='
WHERE
key_id = '45760daf8d4dff15c1b3337435f44cacbdeef2bc1a7fc7703739ec9f2c45f4aa'
AND (
token = '3WJ1l6biAd2j3MBVVzXXCkAo1bqNQXywKOy+FnlALjY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)