UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/Y4Q4xNb0NaFEkW9u/KoWwlMjT5+xEkpgJOKbSGF1s0=' 
WHERE 
  key_id = 'be7fd20c781e195e96e94e1fb9205bf73c49e390c38e266c0e7b6e6a558d6859' 
  AND (
    token = '/Y4Q4xNb0NaFEkW9u/KoWwlMjT5+xEkpgJOKbSGF1s0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019