UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PR01J+qjsjPQBbng5PKDwbie6EUR7giBGJw01Aj/O30=' 
WHERE 
  key_id = '6c754713e24737d694e48f4ba31842bead1c492e7a2b0f1791c66118d553aa56' 
  AND (
    token = 'PR01J+qjsjPQBbng5PKDwbie6EUR7giBGJw01Aj/O30=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037