UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mvzp/TWIUct8clq66Wl7UnjOGLJVNHCb/9eH8OK5ap0='
WHERE
key_id = '57796fb00a380494284383576bb50e1dec77af5671c66ae584c2e11f9a5d3ada'
AND (
token = 'Mvzp/TWIUct8clq66Wl7UnjOGLJVNHCb/9eH8OK5ap0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)