UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vENvsmTP5zSpDSLMTys6E+iLdqRKeSKaF0IQLhD7zVc=' 
WHERE 
  key_id = '61e927d27df3c849b5c8385af1375bcc028e7c25c3bd50a9f8ef22447ffe969e' 
  AND (
    token = 'vENvsmTP5zSpDSLMTys6E+iLdqRKeSKaF0IQLhD7zVc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031