UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'grWJOCh15/ys9xNZFm/4fFa7wtS3+ezuXRNDoSQLFCI='
WHERE
key_id = '08b130f41a5e4b97d6b6cd0d0d657edfe07191397fbb43511be656054660dcc6'
AND (
token = 'grWJOCh15/ys9xNZFm/4fFa7wtS3+ezuXRNDoSQLFCI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)