UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jb9wAWkmKag6vv3cmixLsbFmcSNVNbzepA7Bdyv/Xnc='
WHERE
key_id = '472332ddd00da6c83d45e9c553947520cfbdab2d090e3fa2d6c81550e2b43401'
AND (
token = 'jb9wAWkmKag6vv3cmixLsbFmcSNVNbzepA7Bdyv/Xnc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)