UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rT9vBGHlNc1Vh4PNduCHkN5XyWBvA24oWaqbVe03lCc='
WHERE
key_id = '1154030909a6942aa878765133a9024355af954743d1043a50fd444e709fd812'
AND (
token = 'rT9vBGHlNc1Vh4PNduCHkN5XyWBvA24oWaqbVe03lCc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)