UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IgWjbHW/thqmUQD9vq9NTh2gkC1ZZxS2I70mzZ9RnZ0=' 
WHERE 
  key_id = 'f19e71329e63d427710231bfa98ae5db739b4358ba375bcf4941f0b79422b2c8' 
  AND (
    token = 'IgWjbHW/thqmUQD9vq9NTh2gkC1ZZxS2I70mzZ9RnZ0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00059