UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3G8jk8GR//hBk2BLrCbQjPBgb2sMVX7M2CjalNc5KQc=' 
WHERE 
  key_id = 'dcad7e038fc0bbf780b424e7e70aba8aa6cec6d52fa5aa5eb619df04522cfa7f' 
  AND (
    token = '3G8jk8GR//hBk2BLrCbQjPBgb2sMVX7M2CjalNc5KQc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017