UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LpW3+Xw/fHMaL7c2aCa5dCCBJVSFMJNC1Gte4tkSz+0='
WHERE
key_id = 'e5eefe1101ab2862b2f038e7ae775af3f7f6e5afd730bda71bfd1fa1a0a38f55'
AND (
token = 'LpW3+Xw/fHMaL7c2aCa5dCCBJVSFMJNC1Gte4tkSz+0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)