UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2K3NUxBI4rUYI22rWzP/lot9Yobh7Ans3ItrdfHVGgg='
WHERE
key_id = '963b8b1807d8be5a9fa4f0b8dcca0b4a361a202c9933842fc896080416dc0819'
AND (
token = '2K3NUxBI4rUYI22rWzP/lot9Yobh7Ans3ItrdfHVGgg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)