UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wwnsNWGDbopptWVm3h963Kes7ERN33j5O/aJVGrUGRE='
WHERE
key_id = '69a895f5a2dc777c1c669810301ace1cc6be09f96bf781c4f9842361637d3607'
AND (
token = 'wwnsNWGDbopptWVm3h963Kes7ERN33j5O/aJVGrUGRE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)