UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'urRn/LlXgjP1FhZvmDqs4xQvpCOwhBRemMRFUt6HqqA='
WHERE
key_id = '43cdfa7eb521bf304f679c0965a21f8bd3a5b08722a2f2f3582ec2c3cf4c2a5a'
AND (
token = 'urRn/LlXgjP1FhZvmDqs4xQvpCOwhBRemMRFUt6HqqA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)