UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/vdJxYBX+vVLqCN7ZwMWJqZvjZFYykTqrBcSCJDRqoA='
WHERE
key_id = '2def382ff81fff1b6a9278ee0f662206955af3bddb95d7779217b78de025e76d'
AND (
token = '/vdJxYBX+vVLqCN7ZwMWJqZvjZFYykTqrBcSCJDRqoA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)