UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4UcX1obr/maPms39oBPJhFFQ3X65og1JaMgf1A04VvM=' 
WHERE 
  key_id = '070108dfd6a9e59d00720d362885cc1f560cf3b8f7d0b99716b215ec99a070f5' 
  AND (
    token = '4UcX1obr/maPms39oBPJhFFQ3X65og1JaMgf1A04VvM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025