UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rxNmbksYTpV/zcxiQ8vfVuGiPGyZ9ZKyEzWtETKTZ0k=' 
WHERE 
  key_id = 'd08d29a03fd1ca80fb080767374ca606c2d810afc8463117b9625326fea1b6e3' 
  AND (
    token = 'rxNmbksYTpV/zcxiQ8vfVuGiPGyZ9ZKyEzWtETKTZ0k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00081