UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zni/F6tot6Gsfu83kwQnEBrvbadmdmbpM8lsUJVlTqk='
WHERE
key_id = '44714b236c256c1beb5ba2f89c733d44e51642de3b5a7ee333fbdc6cf2ee4334'
AND (
token = 'Zni/F6tot6Gsfu83kwQnEBrvbadmdmbpM8lsUJVlTqk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)