UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u3pyT/TLeoDk/6SwP6V99USmRo34Mm/LzYP41goRBcQ='
WHERE
key_id = '1e9cd276a2f53401f8fa3d755c0d145c4dde540e1e4a6b13f893be47b1ac4e84'
AND (
token = 'u3pyT/TLeoDk/6SwP6V99USmRo34Mm/LzYP41goRBcQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)