UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vwjTxEIIWR8AooFC4xOB1Jgj4X/3rSur37eW5URPiQM=' 
WHERE 
  key_id = '3a6854ee1a01fe9884f933910132911f83135ccfeba9874a9cbd442165f76947' 
  AND (
    token = 'vwjTxEIIWR8AooFC4xOB1Jgj4X/3rSur37eW5URPiQM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033