UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'G2MQENpKKHQmpiiMSIkcXBDI0WUIIsQCHhPdOQvqpTY='
WHERE
key_id = '070ebf547eac056fea7d88d561fe84ef0bd686c31586434b38fdfdaa9ba1733b'
AND (
token = 'G2MQENpKKHQmpiiMSIkcXBDI0WUIIsQCHhPdOQvqpTY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)