UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3xHo7Q5Hz7YOEiTwamY9mGfkYjhCYLjFd+C1sGwwzaw='
WHERE
key_id = '6ca0f0056e3f3c9032ec6f6bd8ae41d0e04cccb5adb9fe32ccf956eae90d783e'
AND (
token = '3xHo7Q5Hz7YOEiTwamY9mGfkYjhCYLjFd+C1sGwwzaw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)