UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TaoysHv65IWqmYpCoB15AjjyGUnUFK+Z6z9JryqTF2o='
WHERE
key_id = '1b2d25be74b63491edacfb303da1332fd47e79b1c54edca9ba74e768c17f47a2'
AND (
token = 'TaoysHv65IWqmYpCoB15AjjyGUnUFK+Z6z9JryqTF2o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)