UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eDvs5ubgsuPvvIewKRae9AcRdzI2v/nQ6XLIw9JoYhQ='
WHERE
key_id = '2f6cf6d393131d8abb5ac0bad2499262c8fc48b683ed1a60ba513518425097eb'
AND (
token = 'eDvs5ubgsuPvvIewKRae9AcRdzI2v/nQ6XLIw9JoYhQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)