UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ukqWNmAKvBXQFFJYpQmVWmxxzWqM5VOcJ9uWlJISbtg='
WHERE
key_id = '41a118efbe346c8a477f30539de27e6b809ee98ffb7f576d7883ffe6a6086714'
AND (
token = 'ukqWNmAKvBXQFFJYpQmVWmxxzWqM5VOcJ9uWlJISbtg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)