UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9uUz5DfYTIaGk0O6ldr5vcc1bP/3ZuitIgLdbjQTbPw='
WHERE
key_id = 'a68fb7b571ca9fbb39908ae9868283d5544af26f73b7332ba203fa852476207b'
AND (
token = '9uUz5DfYTIaGk0O6ldr5vcc1bP/3ZuitIgLdbjQTbPw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)