UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xEBHPwU7qz1fqJF2XMDSR84ZrzTKm6Tp4oZBiAki6qo='
WHERE
key_id = 'e82bcc89b50697f99d8e8f1a65c41e7f80a9709fbebcc836797d8383757f1dc9'
AND (
token = 'xEBHPwU7qz1fqJF2XMDSR84ZrzTKm6Tp4oZBiAki6qo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)