UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UrozFOEDyjiZRsYLWMvSkNOWh6BfbkjPW2XCht9s54M='
WHERE
key_id = '55972281384a2c5d97f41f81666963aa1390437acd67e662536c6ba488ef0b58'
AND (
token = 'UrozFOEDyjiZRsYLWMvSkNOWh6BfbkjPW2XCht9s54M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)