UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+UjMF/ak/vzzScwaSVCAlawUDFUwGyFBSBdcdbZkRn0=' 
WHERE 
  key_id = '2449174666a48b9c24a200ee217fbfcc14dde4cdbcc1ec1c4284d405043e54ff' 
  AND (
    token = '+UjMF/ak/vzzScwaSVCAlawUDFUwGyFBSBdcdbZkRn0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039