UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mHi8Iz2Lk6kK2BM9nmLRwLFoN3JuQt3Fg0P26nQ3y24='
WHERE
key_id = '692742f5985cb9f72d2b6d2ff6694f0d2825c3a6d0d1efbc81546fa4e20cc988'
AND (
token = 'mHi8Iz2Lk6kK2BM9nmLRwLFoN3JuQt3Fg0P26nQ3y24='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)