UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OjeJnL1bYCi6kMAIuESmTHNOmNva9KF4ljlF+dgPHYA='
WHERE
key_id = 'df8deea0a993de0d609244e7bedd025cdbc47142bbac0a8847b77d06deae71b0'
AND (
token = 'OjeJnL1bYCi6kMAIuESmTHNOmNva9KF4ljlF+dgPHYA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)